package compiler.dto;

import java.util.ArrayList;
import java.util.List;

public class RapportCompilation {

	boolean reussiteCompilation;
	
	List<ErreurCompilation> listeErreurCompilation;
	
	public RapportCompilation() {
		
		listeErreurCompilation = new ArrayList<ErreurCompilation>();
		
	}
	
	public void addErreurCompilation(ErreurCompilation erreurCompilation) {
		listeErreurCompilation.add(erreurCompilation);
	}

	@Override
	public String toString() {
		String ret = "RapportCompilation [reussiteCompilation=" + reussiteCompilation
				+ ", listeErreurCompilation= {\n";
		
		for (ErreurCompilation err : listeErreurCompilation)
			ret += "\t" + err + ",\n";
		
		ret += "}]";
		
		return ret;
	}

	public boolean isReussiteCompilation() {
		return reussiteCompilation;
	}

	public void setReussiteCompilation(boolean reussiteCompilation) {
		this.reussiteCompilation = reussiteCompilation;
	}
	
}
